<?PHP

	$hostname = gethostname();

	$strip_hostname = strrpos($hostname, '.');

	if ($strip_hostname !== false) // Sanity check, maybe there isn't a period after all.
		$hostname = substr($hostname, 0, $strip_hostname /* +1 to include the period itself */);

	$filename = pathinfo( __FILE__); 
	$basename = basename($_SERVER['PHP_SELF'], '.' . $filename['extension']); 
	if ($basename!="index") {
		echo $hostname . " - " . $basename;
	} else if ($basename="index"){
		echo $hostname . " - home";
	}
?>
